import sort.comparison.*;

/**
 * Created by huangyx on 2017/8/7 0007.
 */
public class SortCompare {

    public static void main(String[] args) {

//        Comparable[] shortArrays = Main.instance(50, 0, false);
//        Comparable[] shortArraysR = Main.instance(50, 20, true);
//        Comparable[] middleArrays = Main.instance(50000, 0, false);
//        Comparable[] middleArraysR = Main.instance(50000, 20000, true);
//        Comparable[] longArrays = Main.instance(1000000, 0, false);
        Comparable[] longArraysR = Main.instance(1000000, 200000, true);
        long start = System.currentTimeMillis();
        Quick.sort(longArraysR);
        long end = System.currentTimeMillis();
        boolean sort = Base.isSort(longArraysR);
        System.out.println("是否有序：" + sort);
        System.out.println("耗时： " + (end - start) + " 毫秒");
    }

}
